package com.xiaochen.manager.mapper;

import com.xiaochen.model.dto.system.SysUserDto;
import com.xiaochen.model.entity.system.SysUser;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * @author pinkors
 */
@Mapper
public interface SysUserMapper {

    /**
     * 根据用户名查询用户信息
     * @param userName
     * @return
     */
    SysUser selectUserInfoByUserName(String userName);

    /**
     * 分页查询
     * @param sysUserDto
     * @return
     */
    List<SysUser> selectByPage(SysUserDto sysUserDto);

    /**
     * 添加用户
     * @param sysUser
     */
    void addSysUser(SysUser sysUser);

    /**
     * 修改用户
     * @param sysUser
     */
    void updateSysUser(SysUser sysUser);

    /**
     * 删除用户
     * @param userId
     */
    void deleteById(Integer userId);

    List<SysUser> selectById(Integer userId);
}
